package com.antcom.antread.api.factory;

import com.antcom.antread.api.domain.OperationLog;
import com.antcom.antread.api.service.RemoteLogService;
import com.antcom.antread.common.core.domain.R;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 日志服务降级处理
 *
 * @Author 中国蚂蚁技术有限公司
 * @create 2021/1/1 8:31
 */
@Component
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);

    @Override
    public RemoteLogService create(Throwable throwable) {

        return operationLog -> null;
    }
}
